class AzorunPlayerController extends GamePlayerController;

var AzorunPlayerCamera AzorunCamera;
var bool bIsReadyToInteraction;
var BaseEmitter BeamEmitter;

exec function Activate()
{
	if(BeamEmitter != None)
	{
		BeamEmitter.ToggleEmitter();
	}
}

exec function CameraZoomIn()
{
	AzorunCamera = AzorunPlayerCamera(PlayerCamera);
	if(AzorunCamera != None)
	{
		AzorunCamera.ChangeZoom(true);
	}
}

exec function CameraZoomOut()
{
	AzorunCamera = AzorunPlayerCamera(PlayerCamera);
	if(AzorunCamera != None)
	{
		AzorunCamera.ChangeZoom(false);
	}
}

function GetTriggerUseList(float interactDistanceToCheck, float crosshairDist, float minDot, bool bUsuableOnly, out array<Trigger> out_useList)
{
	local vector cameraLoc;
	local rotator cameraRot;
	local Trigger checkTrigger;

	super.GetTriggerUseList(interactDistanceToCheck, crosshairDist, minDot, bUsuableOnly, out_useList);

	if (Pawn != None)
	{
		// grab camera location/rotation for checking crosshairDist
		GetPlayerViewPoint(cameraLoc, cameraRot);

		// search of nearby actors that have use events
		foreach Pawn.CollidingActors(class'Trigger',checkTrigger,interactDistanceToCheck)
		{
			//8<------
			//Code from the parent function. I've snipped it, but you have to put it in
			//or you'll basically break Use events in Kismet.
			//8<------

			//If it's a usable actor and it hasn't already been added to the list, let's add it.
			if (BaseEmitter(checkTrigger) != None && (out_useList.Length == 0 || out_useList[out_useList.Length-1] != checkTrigger))
			{
				out_useList[out_useList.Length] = checkTrigger;
			}
		}
	}
}

defaultproperties
{
	bIsReadyToInteraction = false;
	CameraClass=class'Azorun.AzorunPlayerCamera'
}
